package com.woniuxy.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="仓库模型")
public class Warehouse {
    @ExcelProperty("id")
    private int id;

    @ExcelProperty("仓库编码")
    @NotNull(message = "编码不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]{6}$",message = "编码为6位数字、字母")
    @ApiModelProperty(value="仓库编码")
    private String warehouse_id;//仓库编码

    @ExcelProperty("仓库名称")
    @NotNull(message = "名称不能为空")
    @Size(min=1, max=20, message="名称为1~20个字符")
    @ApiModelProperty(value="仓库名称")
    private String warehousename;//仓库名称

    @ExcelProperty("仓库分类")
    @NotNull(message = "分类不能为空")
    @ApiModelProperty(value="仓库分类")
    private String warehouse_classify;//仓库分类

    @ExcelProperty("仓库类型")
    @NotNull(message = "类型不能为空")
    @ApiModelProperty(value="仓库类型")
    private String warehouse_style;//仓库类型

    @ExcelProperty("备注")
    @ApiModelProperty(value="备注")
    private String warehouse_remark;

    @ExcelProperty("创建时间")
    private Date created_time;

    @ExcelProperty("创建人")
    private int created_userid;

    @ExcelProperty("修改时间")
    private Date last_modified_time;

    @ExcelProperty("修改人")
    private int last_modified_userid;
}
